package com.zhihuishu.micro.course.openapi.myuni.dto;

/**
 * 课程类别
 * 
 * @author Administrator
 * 
 */
public enum CourseCategoryEnum {

    PUBLIC(1, "公共必修课"), GENERAL(6, "通识课"), PROFESS(7, "专业课"), OTHER(5, "其他");

    private CourseCategoryEnum(int code, String content) {
        this.code = code;// 编号
        this.content = content;// 名称
    }

    private Integer code;

    private String content;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public static CourseCategoryEnum getCourseCategoryEnumByCode(int code) {
        for (CourseCategoryEnum courseCategoryEnum : CourseCategoryEnum.values()) {
            if (courseCategoryEnum.getCode().equals(code)) {
                return courseCategoryEnum;
            }
        }
        return null;
    }
}
